package uk.ac.strath.cis.metric_spaces.framework;

import java.util.Set;

/**
 * @author Robert
 *
 * @param <E>
 */
public interface MetricIndex<E> extends Cloneable{

    /**
     * @param elements
     */
    void insert(Set<E> elements);

    /**
     * @param element
     * @param radius
     * @return
     */
    Set<E> rangeQuery(E element, double radius);

    /**
     * @param element
     * @param number
     * @param nearestQuery
     * @return
     */
    Set<E> nearestNeighbourQuery(E element, int number,
            NearestNeighbourQuery<E> nearestQuery);
    
    /**
     * Uses the default nearest neighbour strategy
     * @param element
     * @param number
     * @return
     */
    Set<E> nearestNeighbourQuery(E element, int number);
    
    MetricIndex<E> clone();
}
